package com.xtq.springcloud.dao;

import com.xtq.springcloud.entity.Member;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

/**
 * @author: xietianqi
 * @create: 2024-01-22 21:37
 * @description: Dao层
 **/

@Mapper

public interface IMemberDao {
	/**
	 * @return
	 * @description: 根据id返回member信息
	 * @author:
	 * @create:
	 * @param: null
	 **/
	@Select("SELECT * FROM `member` WHERE `id` = #{id}")
	Member queryMemberById(Long id);
	
	@Insert("INSERT INTO member (`name`, `pwd`, `mobile`, `email`, `gender` )values (#{name}, MD5(#{pwd}),#{mobile},#{email}, #{gender})")
	int save(Member member);
	
}
